
<div class="user_head_info">
    <div class="user_ava"> 
        <?php if($model['avatar']) : ?>
        <img src="/images/uploads/userAvatars/<?php echo $model['avatar']; ?>" style="width:30px; height: 30px;"/>
        <?php else : ?>
        <img src="/images/prettyImg/default-avatarl.jpg" width="45px" alt="" />
        <?php endif; ?>
    </div>    
    <span class="profile_username"><?php echo $model['displayName']; ?></span><br/>
   <span class="last_login">Последний раз был   <?php echo Yii::app()->dateFormatter->format("dd MMMM в HH:mm", Yii::app()->user->getState('logDate')); ?></span> 
  
</div>


<?php $this->renderPartial('//partials/userMenu', array('countNewComments'=>$this->countNewComments['count'], 'countNewMessages'=>$this->countNewMessages['count'],'curent'=>'profile')); ?>



<div class="padding040">


<h2 class="profil_h2">Редактировать профиль</h2>


<?php echo CHtml::errorSummary($model); ?>



<?php echo CHtml::form('','post',array('enctype'=>'multipart/form-data')); ?>

    
    <div class="span5">
    <div class="control-group">
       <?php echo CHtml::activeLabel($model, 'displayName'); ?>
        <div class="controls">
          <?php echo CHtml::activeTextField($model, 'displayName', array('size'=>50,'maxlength'=>32)); ?>
        </div>
    </div>
    <div class="control-group">
       <?php echo CHtml::activeLabel($model, 'skype'); ?>
        <div class="controls">
           <?php echo CHtml::activeTextField($model, 'skype', array('size'=>'100', 'maxlength'=>'30')); ?>
        </div>
    </div>     
  <div class="control-group">
   <?php echo CHtml::activeLabel($model, 'twitter'); ?>
    <div class="controls">
     <?php echo CHtml::activeTextField($model, 'twitter', array('size'=>'100', 'maxlength'=>'128')); ?>
    </div>
  </div>
    <div class="control-group">
   <?php echo CHtml::activeLabel($model, 'site'); ?>
    <div class="controls">
   <?php echo CHtml::activeTextField($model, 'site', array('size'=>'100', 'maxlength'=>'128')); ?>
    </div>
  </div>
  <div class="control-group">
   <?php echo CHtml::activeLabel($model, 'email'); ?>
    <div class="controls">
   <?php echo CHtml::activeTextField($model, 'email', array('size'=>'100','maxlength'=>320)); ?>
    </div>
  </div>      
  <div class="control-group">
   <?php echo CHtml::activeLabel($model, 'newPassword'); ?>
    <div class="controls">
   <?php echo CHtml::activeTextField($model, 'newPassword', array('size'=>'100', 'maxlength'=>32)); ?> 
    </div>
  </div>        
        
        
        
  </div>   
    

<div class="span5">
    <div class="control-group">
<?php if(Yii::app()->user->getState('avatar')) : ?>
    <img width="60px" height="60px" src="/images/uploads/userAvatars/<?php echo Yii::app()->user->getState('avatar'); ?>"/>
<?php else : ?>
    <img width="60px" height="60px" src="/images/prettyImg/default-avatarl.jpg"/>
<?php endif; ?>


    <?php echo CHtml::activeFileField($model, 'avatar', array('size'=>'9')); ?>
</div>    
    
    <div class="control-group">
  <?php echo CHtml::activeLabel($model, 'descr'); ?>
    <div class="controls">
   <?php echo CHtml::activeTextArea($model, 'descr', array('rows'=>3, 'cols'=>'80')); ?>
    </div>
  </div> 
    
</div>    

<div class="clearfix"></div>



<?php echo CHtml::submitButton('Подтвердить', array('class'=>'addpst')); ?>

<?php echo CHtml::endForm(); ?>
</div>